package njClass.UI
{
	import flash.display.Sprite;
	import flash.net.URLRequest;
	import flash.text.TextField;
	
	import org.gif.player.GIFPlayer;

	public class GifTextField extends Sprite
	{
		private var TextData:String="";
		private var currentID:int=0;
		private var thisLine:Array=new Array();
		
		public function GifTextField()
		{
			super();
		}
		
		public function set text(_str:String):void{
			TextData=_str;
			//addChild(NormalText(_str));
			var exp:RegExp=/(<img src.*>)/;
			trace(_str.split(exp));
			/* while(_str.length==0){
				
			} */
		}
		
		public function get text():String{
			return "";
		}
		
		public function NormalText(_str:String):Sprite{
			var spr:Sprite=new Sprite();
			var txt:TextField=new TextField();
			txt.htmlText=_str;
			spr.addChild(txt);
			thisLine.push(spr);
			return spr;
		}
		
		public function LoadGIF(_url:String):GIFPlayer{
			var gif:GIFPlayer=new GIFPlayer(true);
			gif.load(new URLRequest(_url));
			thisLine.push(gif);
			return gif;
		}
	}
}